//19.[java大数高精度计算BigInteger] N! Plus  https://oj.rnd.huawei.com/problems/19/details
// For each N, output N! in one line.
// java BigInteger 大数乘法,
// BigInteger.add(b);     a+b
// BigInteger.subtract(b) a-b
// BigInteger.multiply(b) a*b
// BigInteger.divide(b)   a/b
//BigInteger abs()  返回大整数的绝对值
//BigInteger add(BigInteger val) 返回两个大整数的和
//BigInteger and(BigInteger val)  返回两个大整数的按位与的结果
//BigInteger andNot(BigInteger val) 返回两个大整数与非的结果
//BigInteger divide(BigInteger val)  返回两个大整数的商
//double doubleValue()   返回大整数的double类型的值
//float floatValue()   返回大整数的float类型的值
//BigInteger gcd(BigInteger val)  返回大整数的最大公约数
//int intValue() 返回大整数的整型值
//long longValue() 返回大整数的long型值
//BigInteger max(BigInteger val) 返回两个大整数的最大者
//BigInteger min(BigInteger val) 返回两个大整数的最小者
//BigInteger mod(BigInteger val) 用当前大整数对val求模
//BigInteger multiply(BigInteger val) 返回两个大整数的积
//BigInteger negate() 返回当前大整数的相反数
//BigInteger not() 返回当前大整数的非
//BigInteger or(BigInteger val) 返回两个大整数的按位或
//BigInteger pow(int exponent) 返回当前大整数的exponent次方
//BigInteger remainder(BigInteger val) 返回当前大整数除以val的余数
//BigInteger leftShift(int n) 将当前大整数左移n位后返回
//BigInteger rightShift(int n) 将当前大整数右移n位后返回
//BigInteger subtract(BigInteger val)返回两个大整数相减的结果
//byte[] toByteArray(BigInteger val)将大整数转换成二进制反码保存在byte数组中
//String toString() 将当前大整数转换成十进制的字符串形式
//BigInteger xor(BigInteger val) 返回两个大整数的异或

import java.math.*;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String strN = sc.nextLine();
        int n = strN.toInt();
        BigInteger res = BigInteger.ONE;
        for (int i = 2; i <= n; i++) {
            res = res.multiply(BigInteger.valueOf(i));
        }
        System.out.println(res);
    }
}

// 输入输出
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextInt()) {
            int a = in.nextInt();
            int b = in.nextInt();
            System.out.println(a+b);
        }
    }
}


// 大数相加
//输入
//2
//1 2
//112233445566778899 998877665544332211
//输出
//Case 1:
//1 + 2 = 3

//Case 2:
//112233445566778899 + 998877665544332211 = 1111111111111111110

import java.math.*;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        //int nLine = sc.nextInt();
        int nLine = Integer.parseInt(sc.nextLine());
        for (int i = 0; i < nLine; i++) {
            String sLine = sc.nextLine();
            String[] split = sLine.split(" ");
            if (split.length < 2) {
                continue;
            }
            BigInteger n1 = new BigInteger(split[0]);
            BigInteger n2 = new BigInteger(split[1]);
            BigInteger n3 = n1.add(n2);
            System.out.println("Case " + (i+1) + ":");
            System.out.println(n1 + " + " + n2 + " = " + n3);
            System.out.println("");
        }
    }
}

